<html>
	<head>
		<meta charset="utf-8"></meta>
		<title>BDoubleSpinBox</title>
		<link href="./style.css" rel="stylesheet" type="text/css"/>
	</head>
	<body>
		<div class="class" name="BDoubleSpinBox">
			<h1>BDoubleSpinBox</h1>
			<p>继承自<a href="BWidget.html">BWidget</a></p>
			<p id="resume">BDoubleSpinBox是浮点数编辑框。<a href="#desc">详细</a></p>
			<h2>public</h2>
			<table id="public">
				<tr><td align="right"/><td><a href="#BDoubleSpinBox(BWidget*)">BDoubleSpinBox</a>(BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#BDoubleSpinBox(double, double,BWidget*)">BDoubleSpinBox</a>(double minimum, double maximum, BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#BDoubleSpinBox(double, double, int,BWidget*)">BDoubleSpinBox</a>(double minimum, double maximum, int decimals, BWidget* parent = 0);</td></tr>
				<tr><td align="right"/><td><a href="#~BDoubleSpinBox()">~BDoubleSpinBox</a>();</td></tr>
				<tr><td align="right">void </td><td><a href="#setAlign(Align)">setAlign</a>(Align align);</td></tr>
				<tr><td align="right">Align </td><td><a href="#align() const">align</a>() const;</td></tr>
				<tr><td align="right">bool </td><td><a href="#setValue(double)">setValue</a>(double value);</td></tr>
				<tr><td align="right">double </td><td><a href="#value() const">value</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setDecimals(int)">setDecimals</a>(int decimals);</td></tr>
				<tr><td align="right">int </td><td><a href="#decimals() const">decimals</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setRange(double, double)">setRange</a>(double minimum, double maximum);</td></tr>
				<tr><td align="right">void </td><td><a href="#setRange(const BRanged&)">setRange</a>(const BRanged& range);</td></tr>
				<tr><td align="right">const BRanged&amp; </td><td><a href="#range() const">range</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setMinimum(double)">setMinimum</a>(double minimum);</td></tr>
				<tr><td align="right">double </td><td><a href="#minimum() const">minimum</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setMaximum(double)">setMaximum</a>(double maximum);</td></tr>
				<tr><td align="right">double </td><td><a href="#maximum() const">maximum</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setPrefix(const BString&)">setPrefix</a>(const BString& prefix);</td></tr>
				<tr><td align="right">const BString&amp; </td><td><a href="#prefix() const">prefix</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setPrefixAlign(Align)">setPrefixAlign</a>(Align prefixAlign);</td></tr>
				<tr><td align="right">Align </td><td><a href="#prefixAlign() const">prefixAlign</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setSuffix(const BString&)">setSuffix</a>(const BString& suffix);</td></tr>
				<tr><td align="right">const BString&amp; </td><td><a href="#suffix() const">suffix</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setSuffixAlign(Align)">setSuffixAlign</a>(Align suffixAlign);</td></tr>
				<tr><td align="right">Align </td><td><a href="#suffixAlign() const">suffixAlign</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setStep(double)">setStep</a>(double step);</td></tr>
				<tr><td align="right">double </td><td><a href="#step() const">step</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#increase()">increase</a>();</td></tr>
				<tr><td align="right">void </td><td><a href="#decrease()">decrease</a>();</td></tr>
				<tr><td align="right">void </td><td><a href="#setFormulable(bool)">setFormulable</a>(bool formulable);</td></tr>
				<tr><td align="right">bool </td><td><a href="#formulable() const">formulable</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setReadOnly(bool)">setReadOnly</a>(bool readOnly);</td></tr>
				<tr><td align="right">bool </td><td><a href="#readOnly() const">readOnly</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setButtonShown(bool)">setButtonShown</a>(bool buttonShown);</td></tr>
				<tr><td align="right">bool </td><td><a href="#buttonShown() const">buttonShown</a>() const;</td></tr>
				<tr><td align="right">void </td><td><a href="#setWheelEnabled(bool)">setWheelEnabled</a>(bool wheelEnabled);</td></tr>
				<tr><td align="right">bool </td><td><a href="#wheelEnabled() const">wheelEnabled</a>() const;</td></tr>
				<tr><td align="right">virtual BSize </td><td><a href="#sizeHint() const">sizeHint</a>() const;</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#input(const BString&, const BValue&)">input</a>(const BString& text, const BValue& value);</td></tr>
				<tr><td align="right">virtual bool </td><td><a href="#query(const BString&, BValue&) const">query</a>(const BString& text, BValue& value) const;</td></tr>
				<tr><td align="right">using </td><td><a href="#BObject::query;()">BObject::query;</a></td></tr>
			</table>
			<h2>protected</h2>
			<table id="protected">
				<tr><td align="right">virtual void </td><td><a href="#updateEvent(const BEvent&)">updateEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#resizeEvent(const BEvent&)">resizeEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#styleEvent(const BEvent&)">styleEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#freshEvent(const BEvent&)">freshEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#paintEvent(const BEvent&)">paintEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#focusEvent(const BEvent&)">focusEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#inputEvent(const BEvent&)">inputEvent</a>(const BEvent& event);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#keyPressEvent(const BKeyEvent&)">keyPressEvent</a>(const BKeyEvent& keyEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#keyReleaseEvent(const BKeyEvent&)">keyReleaseEvent</a>(const BKeyEvent& keyEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseEnterEvent(const BMouseEvent&)">mouseEnterEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseLeaveEvent(const BMouseEvent&)">mouseLeaveEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mousePressEvent(const BMouseEvent&)">mousePressEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseReleaseEvent(const BMouseEvent&)">mouseReleaseEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseMoveEvent(const BMouseEvent&)">mouseMoveEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseWheelEvent(const BMouseEvent&)">mouseWheelEvent</a>(const BMouseEvent& wheelEvent);</td></tr>
				<tr><td align="right">virtual void </td><td><a href="#mouseDoubleClickEvent(const BMouseEvent&)">mouseDoubleClickEvent</a>(const BMouseEvent& mouseEvent);</td></tr>
			</table>
			<div id="desc">
				<h2>详细介绍：</h2>
				<p>BDoubleSpinBox是浮点数编辑框。</p><p>可选择是否开启算式计算功能。</p><p>数值范围可调整，以对数值进行限制。数值文本的对齐方式可改变。</p><p>前缀与后缀用于对数值进行修饰，可使用子样式prefix和suffix进行配置。</p><p>另有用于增减调整的单步值，可使用滚轮或点击右侧的上下按钮进行单步调整。</p><h4>信号表：</h4><table>
					<tr><td>Signal_ValueChanged</td><td>数值被改变时发出，值为：double vaue。</td></tr>
					<tr><td>Signal_RangeChanged</td><td>数值范围改变时发出，值为：BRanged range。</td></tr>
					<tr><td>Signal_StepChanged</td><td>单步调整值改变时发出，值为：double step。</td></tr>
					<tr><td>Signal_ReadOnly</td><td>只读模式被改变时发出，值为：bool readOnly。</td></tr>
					<tr><td>Signal_ValueEdited</td><td>数值被编辑时发出，值为：double vaue。</td></tr>
					<tr><td>Signal_EditFinished</td><td>数值编辑完成时发出，值为：double value。</td></tr></table>
			</div>
			<h2 id="docs">成员文档：</h2>
			<div id="BDoubleSpinBox(BWidget*)">
				<h3>BDoubleSpinBox(BWidget* parent = 0);</h3>
				<p>构造一个浮点数编辑框，parent指定其父控件。</p>
			</div>
			<div id="BDoubleSpinBox(double, double,BWidget*)">
				<h3>BDoubleSpinBox(double minimum, double maximum, BWidget* parent = 0);</h3>
				<p>构造一个浮点数编辑框，minimum和maximum数值范围，parent指定其父控件。</p>
			</div>
			<div id="BDoubleSpinBox(double, double, int,BWidget*)">
				<h3>BDoubleSpinBox(double minimum, double maximum, int decimals, BWidget* parent = 0);</h3>
				<p>构造一个浮点数编辑框，minimum和maximum数值范围，decimals指定小数部分的位数，parent指定其父控件。</p>
			</div>
			<div id="~BDoubleSpinBox()">
				<h3>~BDoubleSpinBox();</h3>
				<p>析构一个浮点数编辑框。</p>
			</div>
			<div id="setAlign(Align)">
				<h3>void setAlign(Align align);</h3>
				<p>设置数值文本的对齐方式。</p>
			</div>
			<div id="align() const">
				<h3>Align align() const;</h3>
				<p>获得数值文本的对齐方式。</p>
			</div>
			<div id="setValue(double)">
				<h3>bool setValue(double value);</h3>
				<p>设置浮点数值。</p>
			</div>
			<div id="value() const">
				<h3>double value() const;</h3>
				<p>获得浮点数值。</p>
			</div>
			<div id="setDecimals(int)">
				<h3>void setDecimals(int decimals);</h3>
				<p>设置小数的位数。</p>
			</div>
			<div id="decimals() const">
				<h3>int decimals() const;</h3>
				<p>获得小数的位数。</p>
			</div>
			<div id="setRange(double, double)">
				<h3>void setRange(double minimum, double maximum);</h3>
				<p>设置数值范围，完成范围修改后若当前浮点数值不在此范围内会被改变。</p>
			</div>
			<div id="setRange(const BRanged&)">
				<h3>void setRange(const BRanged&amp; range);</h3>
				<p>设置数值范围，完成范围修改后若当前浮点数值不在此范围内会被改变。</p>
			</div>
			<div id="range() const">
				<h3>const BRanged&amp; range() const;</h3>
				<p>获得数值范围。</p>
			</div>
			<div id="setMinimum(double)">
				<h3>void setMinimum(double minimum);</h3>
				<p>设置数值范围的最小值。</p>
			</div>
			<div id="minimum() const">
				<h3>double minimum() const;</h3>
				<p>获得数值范围的最小值。</p>
			</div>
			<div id="setMaximum(double)">
				<h3>void setMaximum(double maximum);</h3>
				<p>设置数值范围的最大值。</p>
			</div>
			<div id="maximum() const">
				<h3>double maximum() const;</h3>
				<p>获得数值范围的最大值。</p>
			</div>
			<div id="setPrefix(const BString&)">
				<h3>void setPrefix(const BString&amp; prefix);</h3>
				<p>设置前缀文本。</p>
			</div>
			<div id="prefix() const">
				<h3>const BString&amp; prefix() const;</h3>
				<p>获得前缀文本。</p>
			</div>
			<div id="setPrefixAlign(Align)">
				<h3>void setPrefixAlign(Align prefixAlign);</h3>
				<p>设置前缀文本的对齐方式。</p>
			</div>
			<div id="prefixAlign() const">
				<h3>Align prefixAlign() const;</h3>
				<p>获得前缀文本的对齐方式。</p>
			</div>
			<div id="setSuffix(const BString&)">
				<h3>void setSuffix(const BString&amp; suffix);</h3>
				<p>设置后缀文本。</p>
			</div>
			<div id="suffix() const">
				<h3>const BString&amp; suffix() const;</h3>
				<p>获得后缀文本。</p>
			</div>
			<div id="setSuffixAlign(Align)">
				<h3>void setSuffixAlign(Align suffixAlign);</h3>
				<p>设置后缀文本的对齐方式。</p>
			</div>
			<div id="suffixAlign() const">
				<h3>Align suffixAlign() const;</h3>
				<p>获得后缀文本的对齐方式。</p>
			</div>
			<div id="setStep(double)">
				<h3>void setStep(double step);</h3>
				<p>设置单步值，用于增减操作。</p>
			</div>
			<div id="step() const">
				<h3>double step() const;</h3>
				<p>获得单步值。</p>
			</div>
			<div id="increase()">
				<h3>void increase();</h3>
				<p>单步增值。</p>
			</div>
			<div id="decrease()">
				<h3>void decrease();</h3>
				<p>单步减值。</p>
			</div>
			<div id="setFormulable(bool)">
				<h3>void setFormulable(bool formulable);</h3>
				<p>开启或关闭算式模式。</p>
			</div>
			<div id="formulable() const">
				<h3>bool formulable() const;</h3>
				<p>判断当前是否开启了算式模式。</p>
			</div>
			<div id="setReadOnly(bool)">
				<h3>void setReadOnly(bool readOnly);</h3>
				<p>设置只读模式。</p>
			</div>
			<div id="readOnly() const">
				<h3>bool readOnly() const;</h3>
				<p>判断当前是否开启了只读模式。</p>
			</div>
			<div id="setButtonShown(bool)">
				<h3>void setButtonShown(bool buttonShown);</h3>
				<p>设置单步调整按钮是否显示。</p>
			</div>
			<div id="buttonShown() const">
				<h3>bool buttonShown() const;</h3>
				<p>获得单步调整按钮是否显示。</p>
			</div>
			<div id="setWheelEnabled(bool)">
				<h3>void setWheelEnabled(bool wheelEnabled);</h3>
				<p>设置滚轮操作单步调整是否开启。</p>
			</div>
			<div id="wheelEnabled() const">
				<h3>bool wheelEnabled() const;</h3>
				<p>获得滚轮操作单步调整是否开启。</p>
			</div>
			<div id="sizeHint() const">
				<h3>virtual BSize sizeHint() const;</h3>
				<p>计算合适的值，预设十个数字的宽度。</p>
			</div>
			<div id="input(const BString&, const BValue&)">
				<h3>virtual bool input(const BString&amp; text, const BValue&amp; value);</h3>
				<p>输入表：</p><table>
					<tr><td>text</td><td>设置数值文本， 值为：BString text。</td></tr>
					<tr><td>prefix</td><td>设置前缀文本，值为：BString prefix。</td></tr>
					<tr><td>suffix</td><td>设置后缀文本，值为：BString suffix。</td></tr></table>
			</div>
			<div id="query(const BString&, BValue&) const">
				<h3>virtual bool query(const BString&amp; text, BValue&amp; value) const;</h3>
				<p>查询表：</p><table>
					<tr><td>value</td><td>获得当前浮点数值，值为：double value。</td></tr>
					<tr><td>text</td><td>获得当前数值文本，值为：BString text。</td></tr>
					<tr><td>text-size</td><td>获得当前数值文本的尺寸，值为：BSize textSize。</td></tr>
					<tr><td>text-rect</td><td>获得当前数值文本的显示区域，值为：BRect textRect。</td></tr>
					<tr><td>prefix</td><td>获得前缀文本，值为：BString prefix。</td></tr>
					<tr><td>prefix-rect</td><td>获得前缀文本的显示区域，值为：BRect prefixRect。</td></tr>
					<tr><td>suffix</td><td>获得后缀文本，值为：BString suffix。</td></tr>
					<tr><td>suffix-rect</td><td>获得后缀文本的显示区域，值为：BRect suffixRect。</td></tr>
					<tr><td>code-rects</td><td>获得每个数字字符的显示区域，值为：BRectArray codeRects。</td></tr></table>
			</div>
			<div id="BObject::query;()">
				<h3>using BObject::query;</h3>
			</div>
			<div id="updateEvent(const BEvent&)">
				<h3>virtual void updateEvent(const BEvent&amp; event);</h3>
				<p>更新输入的光标闪烁。</p>
			</div>
			<div id="resizeEvent(const BEvent&)">
				<h3>virtual void resizeEvent(const BEvent&amp; event);</h3>
				<p>重新调整显示布局。</p>
			</div>
			<div id="styleEvent(const BEvent&)">
				<h3>virtual void styleEvent(const BEvent&amp; event);</h3>
				<p>样式表取值：</p><table>
					<tr><td>Value_Align</td><td>取值为文本的对齐方式，值为：Align align。</td></tr></table><p>prefix子样式取值：</p><table>
					<tr><td>Value_Text</td><td>取值为前缀文本，值为：BString prefix。</td></tr>
					<tr><td>Value_Align</td><td>取值为前缀文本对齐方式， 值为：Align prefixAlign。</td></tr></table><p>suffix子样式取值：</p><table>
					<tr><td>Value_Text</td><td>取值为后缀文本，值为：BString suffix。</td></tr>
					<tr><td>Value_Align</td><td>取值为后缀文本的对齐方式，值为：Align suffixAlign。</td></tr></table>
			</div>
			<div id="freshEvent(const BEvent&)">
				<h3>virtual void freshEvent(const BEvent&amp; event);</h3>
				<p>调整文本尺寸以及文本的显示区域。</p>
			</div>
			<div id="paintEvent(const BEvent&)">
				<h3>virtual void paintEvent(const BEvent&amp; event);</h3>
				<p>绘制数值文本，前缀和后缀文本，以及输入光标线。</p>
			</div>
			<div id="focusEvent(const BEvent&)">
				<h3>virtual void focusEvent(const BEvent&amp; event);</h3>
				<p>在非只读模式下，获得焦点则选中数值文本，编辑过程中失去焦点则发出完成编辑的信号：Signal_EditFinished。</p>
			</div>
			<div id="inputEvent(const BEvent&)">
				<h3>virtual void inputEvent(const BEvent&amp; event);</h3>
				<p>可输入数字字符，在算式功能开启时可接收算式字符。</p>
			</div>
			<div id="keyPressEvent(const BKeyEvent&)">
				<h3>virtual void keyPressEvent(const BKeyEvent&amp; keyEvent);</h3>
				<p>各种键的组合处理。</p>
			</div>
			<div id="keyReleaseEvent(const BKeyEvent&)">
				<h3>virtual void keyReleaseEvent(const BKeyEvent&amp; keyEvent);</h3>
				<p>键释放时刷新绘制。</p>
			</div>
			<div id="mouseEnterEvent(const BMouseEvent&)">
				<h3>virtual void mouseEnterEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>处理鼠标进入事件，清除悬停状态。</p>
			</div>
			<div id="mouseLeaveEvent(const BMouseEvent&)">
				<h3>virtual void mouseLeaveEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>处理鼠标离开事件，清除悬停状态。</p>
			</div>
			<div id="mousePressEvent(const BMouseEvent&)">
				<h3>virtual void mousePressEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>更新输入光标位置。</p>
			</div>
			<div id="mouseReleaseEvent(const BMouseEvent&)">
				<h3>virtual void mouseReleaseEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>更新鼠标按下状态。</p>
			</div>
			<div id="mouseMoveEvent(const BMouseEvent&)">
				<h3>virtual void mouseMoveEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>更新鼠标当前悬停位置。</p>
			</div>
			<div id="mouseWheelEvent(const BMouseEvent&)">
				<h3>virtual void mouseWheelEvent(const BMouseEvent&amp; wheelEvent);</h3>
				<p>处理滚轮的单步增减操作。</p>
			</div>
			<div id="mouseDoubleClickEvent(const BMouseEvent&)">
				<h3>virtual void mouseDoubleClickEvent(const BMouseEvent&amp; mouseEvent);</h3>
				<p>左键双击选取单个词。</p>
			</div>
		</div>
	</body>
</html>